Optimal. Leaf size=124 \[ -\frac {B (b c-a d)^2 i^2 n x}{3 b^2}-\frac {B (b c-a d) i^2 n (c+d x)^2}{6 b d}-\frac {B (b c-a d)^3 i^2 n \log (a+b x)}{3 b^3 d}+\frac {i^2 (c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 124, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {2547, 21, 45}
\begin {gather*} \frac {i^2 (c+d x)^3 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{3 d}-\frac {B i^2 n (b c-a d)^3 \log (a+b x)}{3 b^3 d}-\frac {B i^2 n x (b c-a d)^2}{3 b^2}-\frac {B i^2 n (c+d x)^2 (b c-a d)}{6 b d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 21
Rule 45
Rule 2547
Rubi steps
\begin {align*} \int (120 c+120 d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx &=\frac {4800 (c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{d}-\frac {(B n) \int \frac {1728000 (b c-a d) (c+d x)^2}{a+b x} \, dx}{360 d}\\ &=\frac {4800 (c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{d}-\frac {(4800 B (b c-a d) n) \int \frac {(c+d x)^2}{a+b x} \, dx}{d}\\ &=\frac {4800 (c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{d}-\frac {(4800 B (b c-a d) n) \int \left (\frac {d (b c-a d)}{b^2}+\frac {(b c-a d)^2}{b^2 (a+b x)}+\frac {d (c+d x)}{b}\right ) \, dx}{d}\\ &=-\frac {4800 B (b c-a d)^2 n x}{b^2}-\frac {2400 B (b c-a d) n (c+d x)^2}{b d}-\frac {4800 B (b c-a d)^3 n \log (a+b x)}{b^3 d}+\frac {4800 (c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 101, normalized size = 0.81 \begin {gather*} \frac {i^2 \left (-\frac {B (b c-a d) n \left (2 b d (b c-a d) x+b^2 (c+d x)^2+2 (b c-a d)^2 \log (a+b x)\right )}{2 b^3}+(c+d x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )\right )}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.11, size = 0, normalized size = 0.00 \[\int \left (d i x +c i \right )^{2} \left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 289 vs.
\(2 (105) = 210\).
time = 0.27, size = 289, normalized size = 2.33 \begin {gather*} -\frac {1}{3} \, B d^{2} x^{3} \log \left ({\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n} e\right ) - \frac {1}{3} \, A d^{2} x^{3} - B c d x^{2} \log \left ({\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n} e\right ) - A c d x^{2} - \frac {1}{6} \, B d^{2} n {\left (\frac {2 \, a^{3} \log \left (b x + a\right )}{b^{3}} - \frac {2 \, c^{3} \log \left (d x + c\right )}{d^{3}} - \frac {{\left (b^{2} c d - a b d^{2}\right )} x^{2} - 2 \, {\left (b^{2} c^{2} - a^{2} d^{2}\right )} x}{b^{2} d^{2}}\right )} + B c d n {\left (\frac {a^{2} \log \left (b x + a\right )}{b^{2}} - \frac {c^{2} \log \left (d x + c\right )}{d^{2}} + \frac {{\left (b c - a d\right )} x}{b d}\right )} - B c^{2} n {\left (\frac {a \log \left (b x + a\right )}{b} - \frac {c \log \left (d x + c\right )}{d}\right )} - B c^{2} x \log \left ({\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n} e\right ) - A c^{2} x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 232 vs.
\(2 (105) = 210\).
time = 0.42, size = 232, normalized size = 1.87 \begin {gather*} -\frac {2 \, {\left (A + B\right )} b^{3} d^{3} x^{3} - 2 \, B b^{3} c^{3} n \log \left (\frac {d x + c}{d}\right ) + {\left (6 \, {\left (A + B\right )} b^{3} c d^{2} - {\left (B b^{3} c d^{2} - B a b^{2} d^{3}\right )} n\right )} x^{2} + 2 \, {\left (3 \, B a b^{2} c^{2} d - 3 \, B a^{2} b c d^{2} + B a^{3} d^{3}\right )} n \log \left (\frac {b x + a}{b}\right ) + 2 \, {\left (3 \, {\left (A + B\right )} b^{3} c^{2} d - {\left (2 \, B b^{3} c^{2} d - 3 \, B a b^{2} c d^{2} + B a^{2} b d^{3}\right )} n\right )} x + 2 \, {\left (B b^{3} d^{3} n x^{3} + 3 \, B b^{3} c d^{2} n x^{2} + 3 \, B b^{3} c^{2} d n x\right )} \log \left (\frac {b x + a}{d x + c}\right )}{6 \, b^{3} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 860 vs.
\(2 (105) = 210\).
time = 3.11, size = 860, normalized size = 6.94 \begin {gather*} -\frac {1}{6} \, {\left (\frac {2 \, {\left (B b^{4} c^{4} n - 4 \, B a b^{3} c^{3} d n + 6 \, B a^{2} b^{2} c^{2} d^{2} n - 4 \, B a^{3} b c d^{3} n + B a^{4} d^{4} n\right )} \log \left (\frac {b x + a}{d x + c}\right )}{b^{3} d - \frac {3 \, {\left (b x + a\right )} b^{2} d^{2}}{d x + c} + \frac {3 \, {\left (b x + a\right )}^{2} b d^{3}}{{\left (d x + c\right )}^{2}} - \frac {{\left (b x + a\right )}^{3} d^{4}}{{\left (d x + c\right )}^{3}}} - \frac {3 \, B b^{6} c^{4} n - 12 \, B a b^{5} c^{3} d n - \frac {5 \, {\left (b x + a\right )} B b^{5} c^{4} d n}{d x + c} + 18 \, B a^{2} b^{4} c^{2} d^{2} n + \frac {20 \, {\left (b x + a\right )} B a b^{4} c^{3} d^{2} n}{d x + c} + \frac {2 \, {\left (b x + a\right )}^{2} B b^{4} c^{4} d^{2} n}{{\left (d x + c\right )}^{2}} - 12 \, B a^{3} b^{3} c d^{3} n - \frac {30 \, {\left (b x + a\right )} B a^{2} b^{3} c^{2} d^{3} n}{d x + c} - \frac {8 \, {\left (b x + a\right )}^{2} B a b^{3} c^{3} d^{3} n}{{\left (d x + c\right )}^{2}} + 3 \, B a^{4} b^{2} d^{4} n + \frac {20 \, {\left (b x + a\right )} B a^{3} b^{2} c d^{4} n}{d x + c} + \frac {12 \, {\left (b x + a\right )}^{2} B a^{2} b^{2} c^{2} d^{4} n}{{\left (d x + c\right )}^{2}} - \frac {5 \, {\left (b x + a\right )} B a^{4} b d^{5} n}{d x + c} - \frac {8 \, {\left (b x + a\right )}^{2} B a^{3} b c d^{5} n}{{\left (d x + c\right )}^{2}} + \frac {2 \, {\left (b x + a\right )}^{2} B a^{4} d^{6} n}{{\left (d x + c\right )}^{2}} - 2 \, A b^{6} c^{4} - 2 \, B b^{6} c^{4} + 8 \, A a b^{5} c^{3} d + 8 \, B a b^{5} c^{3} d - 12 \, A a^{2} b^{4} c^{2} d^{2} - 12 \, B a^{2} b^{4} c^{2} d^{2} + 8 \, A a^{3} b^{3} c d^{3} + 8 \, B a^{3} b^{3} c d^{3} - 2 \, A a^{4} b^{2} d^{4} - 2 \, B a^{4} b^{2} d^{4}}{b^{5} d - \frac {3 \, {\left (b x + a\right )} b^{4} d^{2}}{d x + c} + \frac {3 \, {\left (b x + a\right )}^{2} b^{3} d^{3}}{{\left (d x + c\right )}^{2}} - \frac {{\left (b x + a\right )}^{3} b^{2} d^{4}}{{\left (d x + c\right )}^{3}}} + \frac {2 \, {\left (B b^{4} c^{4} n - 4 \, B a b^{3} c^{3} d n + 6 \, B a^{2} b^{2} c^{2} d^{2} n - 4 \, B a^{3} b c d^{3} n + B a^{4} d^{4} n\right )} \log \left (b - \frac {{\left (b x + a\right )} d}{d x + c}\right )}{b^{3} d} - \frac {2 \, {\left (B b^{4} c^{4} n - 4 \, B a b^{3} c^{3} d n + 6 \, B a^{2} b^{2} c^{2} d^{2} n - 4 \, B a^{3} b c d^{3} n + B a^{4} d^{4} n\right )} \log \left (\frac {b x + a}{d x + c}\right )}{b^{3} d}\right )} {\left (\frac {b c}{{\left (b c - a d\right )}^{2}} - \frac {a d}{{\left (b c - a d\right )}^{2}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.62, size = 303, normalized size = 2.44 \begin {gather*} \ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\,\left (B\,c^2\,i^2\,x+B\,c\,d\,i^2\,x^2+\frac {B\,d^2\,i^2\,x^3}{3}\right )-x\,\left (\frac {\left (3\,a\,d+3\,b\,c\right )\,\left (\frac {d\,i^2\,\left (3\,A\,a\,d+9\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{3\,b}-\frac {A\,d\,i^2\,\left (3\,a\,d+3\,b\,c\right )}{3\,b}\right )}{3\,b\,d}-\frac {c\,i^2\,\left (3\,A\,a\,d+3\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{b}+\frac {A\,a\,c\,d\,i^2}{b}\right )+x^2\,\left (\frac {d\,i^2\,\left (3\,A\,a\,d+9\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{6\,b}-\frac {A\,d\,i^2\,\left (3\,a\,d+3\,b\,c\right )}{6\,b}\right )+\frac {\ln \left (a+b\,x\right )\,\left (B\,n\,a^3\,d^2\,i^2-3\,B\,n\,a^2\,b\,c\,d\,i^2+3\,B\,n\,a\,b^2\,c^2\,i^2\right )}{3\,b^3}+\frac {A\,d^2\,i^2\,x^3}{3}-\frac {B\,c^3\,i^2\,n\,\ln \left (c+d\,x\right )}{3\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________